<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<link rel="stylesheet" type="text/css" href="../css/aui.css" />
		<style type="text/css">
			.text-white {
				color: #ffffff !important;
			}
			.aui-grid [class=aui-col-] {
				padding: 0.75 rem 0;
			}
			.aui-list-item-arrow .my-font {
				font-size: 14px;
			}
		</style>
	</head>
	<body>
		<!-- 顶部 -->
		<section class="aui-content" >
			<div class="aui-list aui-media-list aui-list-noborder aui-bg-info">
				<div class="aui-list-item aui-list-item-middle" style="background-color: #14ace8">
					<div class="aui-media-list-item-inner " style="background-color: #14ace8">
						<div class="aui-list-item-media" style="width:3rem;">
							<img src="../img/bing.png" class="aui-img-round" id="picture" >
						</div>
						<div class="aui-list-item-inner">
							<div class="aui-list-item-text text-white aui-font-size-16" id="name"></div>
							<div class="aui-list-item-text text-white">
								<div>
									<i class="aui-iconfont aui-icon-mobile aui-font-size-13"></i><span id="phone"></span>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</section>
		<section class="aui-content">
			<ul class="aui-list aui-list-in aui-margin-b-15">
				<li class="aui-list-item" onclick="openWindows('detailed')">
					<div class="aui-list-item-label-icon">
						<i class="aui-iconfont aui-icon-cert aui-text-warning"></i>
					</div>
					<div class="aui-list-item-inner aui-list-item-arrow">
						<div class="aui-list-item-title my-font">
							我的名片
						</div>
						<div class="aui-list-item-right"></div>
					</div>
				</li>
				<li class="aui-list-item" onclick="openWindows('password')">
					<div class="aui-list-item-label-icon">
						<i class="aui-iconfont aui-icon-menu aui-text-info"></i>
					</div>
					<div class="aui-list-item-inner aui-list-item-arrow">
						<div class="aui-list-item-title my-font">
							修改密码
						</div>
					</div>
				</li>
				<li class="aui-list-item" onclick="openWindows('data')">
					<div class="aui-list-item-label-icon">
						<i class="aui-iconfont aui-icon-my aui-text-info"></i>
					</div>
					<div class="aui-list-item-inner aui-list-item-arrow">
						<div class="aui-list-item-title my-font">
							个人资料
						</div>
					</div>
				</li>
			</ul>
			<!-- <ul class="aui-list aui-list-in">
				<li class="aui-list-item" onclick=" outLogin()">
					<div class="aui-list-item-label-icon">
						<i class="aui-iconfont aui-icon-back aui-text-info"></i>
					</div>
					<div class="aui-list-item-inner aui-list-item-arrow">
						<div class="aui-list-item-title my-font">
							退出登录
						</div>
					</div>
				</li>
			</ul> -->
		</section>
	</body>
	<script src="../js/jquery.min.js"></script>
	<script type="text/javascript">
	
		//初始方法
	$(function() {
		getPage();
	});
	
	
	function getPage() {
		$.ajax({
				url : '${pageContext.request.contextPath}/appcrm/cardDetail.do',
				type : "POST",
				dataType : "json",
				success : function(data) {
					if (data.code == "0") {
						if (data.emp != "undefined") {
							$("#phone").html(data.emp.phoneNumber);
							$("#name").html(data.emp.name);
							if (data.emp.picture != null && data.emp.picture != "") {
								$("#picture").attr("src", '${pageContext.request.contextPath}/' + data.emp.picture);
								$("#picture").val(data.emp.picture);
							}
							toast.hide();
						}
					}
				}
			});
	}
	
	//打开详细
	function openWindows(str) {
		window.location.href = "${pageContext.request.contextPath}/wap/public_users.do?path=users_"+str;
	}
	
	//退出登录
	function outLogin() {
		window.location.href = "${pageContext.request.contextPath}/loginOff.do";
	}
	
	
	
/* 	function outLogin() {
			//清空登录状态
			$api.clearStorage();
			//关闭当前窗口
			api.closeWin({
				name : 'main'
			});
			api.closeToWin({
				name : 'root'
			})
			api.openWin({
				name : 'login_head',
				url : 'login/login_head.html',
			});
		} */

	</script>
</html>